int gcd(int a,int b)
{
    int c=a+b;
    for(;c>=1;c--)
    {
        if(a%c==0&&b%c==0)
            return c;
    }
    return 1;

}
int lcm(int a,int b)
{
    int c;
    for(c=1;c<=a*b;c++)
    {
        if(c%a==0&&c%b==0)
            return c;
    }
    return a*b;

}
int main()
{
    printf("%d\n",gcd(22,44)==22);
    printf("%d\n",gcd(66,99)==33);
    printf("%d\n",lcm(22,44)==44);
    printf("%d\n",lcm(66,99)==198);
    return 0;
}
